<template>
  <div class="box">
    <h3>首页</h3>
    <div class="list">
      <div class="left">
        <p class="text">{{ this.list.userCount }}</p>
        <span class="all">用户总数</span>
      </div>
      <div class="center">
        <p class="text">{{ this.list.productCount }}</p>
        <span class="all">用户总数</span>
      </div>
      <div class="right">
        <p class="text">{{ this.list.orderCount }}</p>
        <span class="all">用户总数</span>
      </div>
    </div>

    <!-- <div>
      <h2>首页</h2>
      <div class="wrap_title">
        <div class="title1">
          <p>997</p>
          <span><i class="el-icon-user"></i>用户总数</span>
        </div>
        <div class="title2">
          <p>1611</p>
          <span><i class="el-icon-notebook-2"></i>商品总数</span>
        </div>
        <div class="title3">
          <p>920</p>
          <span><i class="el-icon-folder-checked"></i>订单总数</span>
        </div>
      </div>
    </div> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    this.$axios
      .post("http://adminv2.happymmall.com/manage/statistic/base_count.do")
      .then((res) => {
        //console.log(res.data.data)
        this.list = res.data.data;
      });
  },
  methods: {},
};
</script>

<style scoped> 
.box {
  width: 80%;
  margin-left: 20%;
}
.list {
  margin-top: 20px;
  width: 95%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.list div {
  width: 260px;
  height: 160px;
}
.left {
  background-color: #f0ad4f;
  color: white;
}
.text {
  font-size: 50px;
  text-align: center;
  margin-top: 20px;
}
.all {
  font-size: 20px;
  margin-top: 20px;
  margin-left: 90px;
}
.center {
  background-color: #5cb85c;
  color: white;
}
.right {
  background-color: #4cb1cf;
  color: white;
}
.list div {
  transition: all 0.5s;
}
.list div:hover {
  transform: scale(1.2);
  border: 1px solid orange;
  color: #333333;
}
</style>
